import request from "@/request/";

//分页
export const getList = (data) => {
  return request({
    url: "/api/mes-warehouse-service/receipt_plan/page",
    method: "POST",
    data,
  });
};

// 导出
export const exportTableData = (data) => {
  return request({
    url: `/api/mes-warehouse-service/receipt_plan/export`,
    method: "POST",
    responseType: "blob",
    timeout: 300000,
    data: data,
  });
};

// 导入
export const importTableData = (file) => {
  return request({
    url: `/api/mes-warehouse-service/receipt_plan/upload`,
    method: "POST",
    headers: {
      "Content-Type":
        "multipart/form-data; boundary=----WebKitFormBoundary1234567890",
    },
    responseType: "blob",
    timeout: 300000,
    data: file,
  });
};

//删除
export const remove = (data) => {
  return request({
    url: "/api/mes-warehouse-service/receipt_plan/remove",
    method: "POST",
    data,
  });
};
